using MyHomeworkWebAPi.Models.DTOs;
using MyHomeworkWebAPi.Models.ef;
using MyHomeworkWebAPi.Models.Request;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace MyHomeworkWebAPi.Services
{
    /// <summary>
    /// 商品服务接口
    /// </summary>
    public interface IProductServices
    {
        /// <summary>
        /// 获取所有商品
        /// </summary>
        Task<List<ProductDTO>> GetAllAsync();

        /// <summary>
        /// 根据ID获取商品
        /// </summary>
        Task<ProductDTO> GetByIdAsync(Guid id);

        /// <summary>
        /// 创建商品
        /// </summary>
        Task<ProductDTO> CreateAsync(Guid userId, ProductCreateRequest request);

        /// <summary>
        /// 更新商品状态
        /// </summary>
        Task<ProductDTO> UpdateStatusAsync(Guid productId, string status);

        /// <summary>
        /// 获取用户发布的商品
        /// </summary>
        Task<List<ProductDTO>> GetByUserIdAsync(Guid userId);

        /// <summary>
        /// 根据分类获取商品
        /// </summary>
        Task<List<ProductDTO>> GetByCategoryAsync(Guid categoryId);

        /// <summary>
        /// 搜索商品
        /// </summary>
        Task<List<ProductDTO>> SearchAsync(string keyword);

        /// <summary>
        /// 删除商品
        /// </summary>
        Task<bool> DeleteAsync(Guid productId);

        /// <summary>
        /// 更新商品信息
        /// </summary>
        Task<ProductDTO> UpdateAsync(Guid productId, ProductCreateRequest request);
    }
}